home *** CD-ROM | disk | FTP | other *** search
- /* Effect Operators Mosaic
- 100
- */
-
- call addlib("rexxmathlib.library", 5, -30, 0)
-
- options results
-
- parse ARG Port Opt1 Opt2 Opt3 s0 t0 s1 t1 b
-
- ADDRESS value Port
-
- pp_GetWidth
- w=result
- pp_GetHeight
- h=result
- pp_GetDepth
- D=result
-
- pp_ComposeReqOff
- pp_GetCurrentBrush
- CB=result
- pp_FindEmptyBrush
- Brush=result
- pp_SetBrush Brush
- pp_GotoFrame s0
- pp_PicttoSpare
- pp_GotoFrame s1
- pp_Pickbrush 0 0 W H
-
- Start_Fade=0
- End_Fade=100
- Start_Rot=180
- End_Rot=0
- Start_Scale=0
- End_Scale=100
-
- Step=(s1-s0)
- Step_Fade=(End_Fade-Start_Fade)/Step
- Step_Rot=(End_Rot-Start_Rot)/Step
- Step_Scale=(End_Scale-Start_Scale)/Step
-
- Do i=s0 to s1
-
- rot=trunc(Start_Rot+Step_Rot*(i-s0)+0.5,0)
- Fade=trunc(Start_Fade+Step_Fade*(i-s0)+0.5,0)
- Scale=trunc(Start_Scale+Step_Scale*(i-s0)+0.5,0)
-
- IF t1=1 then DO
- pp_GotoFrame (s1+i-s0)
- pp_Pickbrush 0 0 W H
- END
- ELSE DO
- pp_GotoFrame s1
- pp_Pickbrush 0 0 W H
- END
-
- pp_GotoFrame i
- IF t0=0 then DO
- pp_GotoFrame i
- pp_SpareToPict
- END
-
- IF i>s0 then DO
- if i<s1 then DO
- SX=trunc((w*Scale)/100+0.5,0)
- SY=trunc((h*Scale)/100+0.5,0)
- pp_ScaleBrush SX SY
- pp_BrushEffect 0 0 0 rot 2
- END
- END
-
- IF Opt1=1 then DO
- pp_BrushOpacity Fade
- END
-
- if i>s0 then DO
- pp_plot w/2 h/2
- END
-
- END
-
- pp_Gotoframe s0
- pp_FreeBrush
- pp_SetBrush CB
- pp_BrushOpacity 100
-
- pp_EffectOff
- pp_ComposeReqOn
-
- EXIT
-